package com.study.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 抽奖机会服务
 *
 * @author 西街恶人
 * @date 2021/5/24
 */
@Mapper
public interface LotteryDrawMapper {

    /**
     * 增加一次抽奖次数
     * @param userAccountId 用户账号id
     */
    @Update("UPDATE lottery_draw "
            + "SET lottery_draw_count = lottery_draw_count + 1 "
            + "WHERE user_account_id=#{userAccountId}")
    void increment(@Param("userAccountId") Long userAccountId);
}
